// 删除方法
import request from '@/utils/request'

export function delDepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}

// 新增部门接口

export function addDepartments(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 获取当前行详情的数据接口

export function getdepartDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}

// 更新数据

export function updateDetail(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'PUT',
    data
  })
}

